﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace HZYProject.Domain
{
    public class Course
    {
        /// <summary>
        /// 课程编号
        /// </summary>
        [Key]
        public Guid CourseID { get; set; }

        /// <summary>
        /// 课程名称
        /// </summary>
        [StringLength(50)]
        public string Title { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DataType(DataType.DateTime)]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 导航属性-章节
        /// </summary>
        public virtual ICollection<Chapter> Chapters { get; set; }

        /// <summary>
        /// 导航属性-所有的学生
        /// </summary>
        public virtual ICollection<Student> Students { get; set; }
    }
}
